package com.dmall.sharding.jdbc.mapper;

import com.dmall.sharding.jdbc.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Select("select * from dmall_user where id = #{id}")
    User selectById(Integer id);

    @Insert("insert into dmall_user(login_name, password, real_name, phone, email, gender, birth, description) values(#{loginName}, #{password}, #{realName}, #{phone}, #{email}, #{gender}, #{birth}, #{description})")
    void insertUser(User user);
}
